package com.tan.Controller;

import com.tan.mapper.UserMapper;
import com.tan.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserMapper userMapper;
    @RequestMapping("/a")
    public List<User> queryUserList()
    {
        return userMapper.getUsers();
    }
//    @RequestMapping("/b")
//    public String addUser()
//    {
//        User user = new User(6, "小红", "131414");
//        userMapper.addUser(user);
//        return "成功";
//    }
}
